package com.dragon.loan.repository;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.dragon.common.repository.mybatis.BaseRepository;
import com.dragon.common.repository.mybatis.MyBatisRepository;
import com.dragon.loan.entity.CmAttachment;

@MyBatisRepository
public interface CmAttachmentRepository extends BaseRepository<CmAttachment, Long>{
	
	public int updateAppIdAndCaseId(Map<String,Object> map);
	
	public List<CmAttachment> queryByLoanId(Map<String,Object> map);
	
	void updateByPrimaryKeySelective(CmAttachment CmAttachment);
	
	public List<CmAttachment> selectByidNo(Map<String,Object> map);
	/**
	 * 查询用户有效的所有的附件资料
	 * @param loanId
	 * @return
	 */
	public List<CmAttachment> findByLoanId(String loanId);
	
	public void updateAcLoanApplyBxInfo(Map map );
	
	public CmAttachment getCmAttachmentByType(@Param("loanId") String loanId, @Param("atmtType") String atmtType,@Param("fileId") Integer fileId);
	
	List<CmAttachment> findSignture(String loanId);

}
